package cn.tedu._01mvcboot01.controller;

import cn.tedu._01mvcboot01.pojo.dto.AddCarDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CarController {
    @RequestMapping("/v1/car/add")
    @ResponseBody
    public String add(String brand ,String color,double price){
        System.out.println("添加车辆："+brand+"--"+color+"--"+price);
        return "添加车辆成功！！";
    }
    @RequestMapping("/v1/car/add1")
    @ResponseBody
    public String add(AddCarDTO addCarDTO){
        System.out.println("添加车辆："+addCarDTO);
        return "添加车辆成功！！";
    }

}
